package com.my.socket.nio.v25;

import java.io.OutputStream;
import java.net.InetSocketAddress;
import java.net.Socket;

public class Client {

    public static void main(String[] args) throws Exception {
        Socket socket = new Socket();
        InetSocketAddress inetSocketAddress = new InetSocketAddress("127.0.0.1", 9999);
        socket.connect(inetSocketAddress);
        OutputStream outputStream = socket.getOutputStream();
        outputStream.write("hei hei hei".getBytes());
    }
}
